/*
 *  Copyright 2008 Mark Ashworth <javameme@gmail.com>.
 * 
 *  Licensed under the GNU General Public License v3 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *       http://www.gnu.org/licenses/gpl-3.0.html
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */

package xperiment.metaphor.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
import metaphor.web.users.UsersController;

/**
 *
 * @author Mark Ashworth <javameme@gmail.com>
 * @version 1.0.0
 */
@ContextConfiguration(locations="classpath:context-testing.xml")
public class AbstractWebJUnit extends AbstractJUnit38SpringContextTests {
    /* 
     * This variable is meant to hide the JCL logger declared in the parent 
     */
    protected Logger logger = LoggerFactory.getLogger(getClass());
    
    public AbstractWebJUnit(String testName) {
        super(testName);
    }  
    
    @Override
    protected void tearDown() throws Exception {
        super.tearDown();
    }

    protected Object getBean(String name) {
        return applicationContext.getBean(name);
    }
    protected UsersController getUsersController() {
        return (UsersController) getBean("usersController");
    }
}
